import Cookies from 'js-cookie'

const TokenKey = 'H-Token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function getLogedUser() {
  return Cookies.get('logedUser')
}

// user = { }
export function setLogedUser(user) {
  return Cookies.set('logedUser', user)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function removeCurrentRegionid() {
  return Cookies.remove('currentReginid')
}

export function removeCurrentTitle() {
  return Cookies.remove('currentTitle')
}

export function removeFirstLogin() {
  return Cookies.remove('firstLogin')
}

export function removeCurrentLineId() {
  return Cookies.remove('currentLineId')
}

export function removeLogedUser() {
  return Cookies.remove('logedUser')
}
